import Vue from 'vue'
import Router from 'vue-router'
import routers from './router'

Vue.use(Router)

var route = new Router({
  mode: 'hash',
  base: 'http://localhost:8080',
  routes: routers
})




route.beforeEach((to,from,next) => {//路由，每个进入页面之前
  // 设置进入页面动画
  
  // 设置网页title
  const title = to.meta.title ? to.meta.title : '标题';//判断是否有meta的title
  window.document.title = title;
})